//express能很优雅的匹配路由
var express = require("express");

var app = express();
app.get('/', function(req, res) {
	res.send("你好 express！");
});
app.get('/student/:id',function(req, res) {
	var id = req.params["id"];
	console.log('id：'+id);
	if(/^\d{6}$/.test(id)) {
		res.send("学生的学号为："+id);
	}else{
		res.send("学号格式不正确");
	}
})
app.listen(80, '127.0.0.1');
console.log("正在监听80端口");
